<div id="bigPanel">
  <div id="smallPanel">
    <div class="img">
      <img src="../../../assets/images/oaaaaaaaaa.png" />
    </div>
    <form #frm="ngForm">
      <div class="divs">
        <label class="text">用户名:</label>
        <input type="text" name="name" [(ngModel)]="data.name" #name="ngModel" required
          pattern="1[34578]\d{9}">
        <div *ngIf="name.invalid && (name.touched || name.dirty)">
          <div class="btn btn-danger" *ngIf="name.hasError('required')">用户名不可为空</div>
          <div class="btn btn-danger" *ngIf="name.hasError('pattern')">用户名错误</div>
        </div>
      </div>

      <div class="divs">
        <label class="text">密码:</label>
        <input type="password" name="password" [(ngModel)]="data.password" #password="ngModel" required pattern="\d{6}">
        <div *ngIf="password.invalid && (password.touched || password.dirty)">
          <div class="btn btn-danger" *ngIf="password.hasError('required')">密码不可为空</div>
          <div class="btn btn-danger" *ngIf="password.hasError('pattern')">密码错误</div>
        </div>
      </div>
<!-- 
      <div class="divs">
        <label class="text">验证码:</label>
        <input type="text"  id="codeText" name="code" [(ngModel)]="data.code" #code="ngModel" required
          pattern="[0-9,A-z]{4}">
        <img src="data.code" class="code" (click)="getCode()"/>
      </div> -->
      <button id="btn-login"  (click)="btnLogin()">登录</button>
    </form>
  </div>
</div>